<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ADC: ADC.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ADC
   &#160;<span id="projectnumber">9.2</span>
   </div>
   <div id="projectbrief">Analog to Digital Conversor library for the Teensy 3.6 microprocessor</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_a_d_c_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">ADC.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Teensy 4.x, 3.x, LC ADC library</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * https://github.com/pedvide/ADC</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright (c) 2020 Pedro Villanueva</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * a copy of this software and associated documentation files (the</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * &quot;Software&quot;), to deal in the Software without restriction, including</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * without limitation the rights to use, copy, modify, merge, publish,</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * distribute, sublicense, and/or sell copies of the Software, and to</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * permit persons to whom the Software is furnished to do so, subject to</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * the following conditions:</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * included in all copies or substantial portions of the Software.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> * SOFTWARE.</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">/* TODO</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> * - Function to measure more that 1 pin consecutively (stream?)</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment"> * bugs:</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment"> * - comparison values in 16 bit differential mode are twice what they should be</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">#ifndef ADC_H</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">#define ADC_H</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">#define ADC_0 0</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor">#define ADC_1 1</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment">// enum class ADC_NUM {ADC_0, ADC_1}; // too verbose, but it&#39;d avoid some</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment">// mistakes</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="comment">// include ADC module class</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">#include &quot;ADC_Module.h&quot;</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="class_a_d_c.html">   69</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_a_d_c.html">ADC</a> {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <span class="comment">// ADCs objects</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  <a class="code" href="class_a_d_c___module.html">ADC_Module</a> adc0_obj;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  <a class="code" href="class_a_d_c___module.html">ADC_Module</a> adc1_obj;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  <span class="keyword">const</span> uint8_t num_ADCs = ADC_NUM_ADCS;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <a class="code" href="class_a_d_c.html#a60b6e21403b1f30984f63832c0562960">ADC</a>();</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160; </div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <span class="comment">// create both adc objects</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160; </div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">   88</a></span>&#160;  <a class="code" href="class_a_d_c___module.html">ADC_Module</a> *<span class="keyword">const</span> <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a> = &amp;adc0_obj; <span class="comment">// adc object pointer</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  <a class="code" href="class_a_d_c___module.html">ADC_Module</a> *<span class="keyword">const</span> <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a> = &amp;adc1_obj; <span class="comment">// adc object pointer</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="preprocessor">#ifdef ADC_SINGLE_ADC</span></div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  <a class="code" href="class_a_d_c___module.html">ADC_Module</a> *<span class="keyword">const</span> <a class="code" href="class_a_d_c.html#a03e1c7f64c02dec1976810a0a4967cf2">adc</a>[ADC_NUM_ADCS] = {<a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>};</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  <a class="code" href="class_a_d_c___module.html">ADC_Module</a> *<span class="keyword">const</span> <a class="code" href="class_a_d_c.html#a03e1c7f64c02dec1976810a0a4967cf2">adc</a>[ADC_NUM_ADCS] = {<a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>, <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>};</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160; </div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a4fe2513725fa0099460fc711b037f1e5">  111</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a4fe2513725fa0099460fc711b037f1e5">setReference</a>(<a class="code" href="namespace_a_d_c__settings.html#a5f42fd9e070e88475ec7cee39bbf4f8d">ADC_REFERENCE</a> type) {</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;<a class="code" href="class_a_d_c___module.html#a784d946712d1d0ee475822b7b8f99ace">setReference</a>(type);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;<a class="code" href="class_a_d_c___module.html#a784d946712d1d0ee475822b7b8f99ace">setReference</a>(type);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  }</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a6b8f4f571b7729d9da50b72ab93ec023">  127</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a6b8f4f571b7729d9da50b72ab93ec023">setResolution</a>(uint8_t bits) {</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;<a class="code" href="class_a_d_c___module.html#a6bd8da02e5e9bd3b2b3db30d5faa3585">setResolution</a>(bits);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;<a class="code" href="class_a_d_c___module.html#a6bd8da02e5e9bd3b2b3db30d5faa3585">setResolution</a>(bits);</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  }</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="class_a_d_c.html#acca4ab7812f804a09b28d7a76daff8fa">  139</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#acca4ab7812f804a09b28d7a76daff8fa">setConversionSpeed</a>(<a class="code" href="namespace_a_d_c__settings.html#aab853fc1fcb1992fd5d51408adf7688e">ADC_CONVERSION_SPEED</a> speed) {</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;<a class="code" href="class_a_d_c___module.html#a281b4f6ca2705f934bc86b1a25679138">setConversionSpeed</a>(speed);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;<a class="code" href="class_a_d_c___module.html#a281b4f6ca2705f934bc86b1a25679138">setConversionSpeed</a>(speed);</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  }</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="class_a_d_c.html#ac7dad7a76bdd4965eced74692a5de886">  154</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#ac7dad7a76bdd4965eced74692a5de886">setSamplingSpeed</a>(<a class="code" href="namespace_a_d_c__settings.html#af0d80a1aae7288f77b13f0e01d9da0d3">ADC_SAMPLING_SPEED</a> speed) {</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;<a class="code" href="class_a_d_c___module.html#a2aa4693c5be479f3189d31f59d212509">setSamplingSpeed</a>(speed);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;<a class="code" href="class_a_d_c___module.html#a2aa4693c5be479f3189d31f59d212509">setSamplingSpeed</a>(speed);</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;  }</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160; </div>
<div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="class_a_d_c.html#aa80d9ebc6a60605e1b9a25f2db8734e9">  165</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#aa80d9ebc6a60605e1b9a25f2db8734e9">setAveraging</a>(uint8_t num) {</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;<a class="code" href="class_a_d_c___module.html#a55954618c5c27c1ffce4321e912bac52">setAveraging</a>(num);</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;<a class="code" href="class_a_d_c___module.html#a55954618c5c27c1ffce4321e912bac52">setAveraging</a>(num);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;  }</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160; </div>
<div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="class_a_d_c.html#af81b3c7805c688558ab25d66a8adf982">  181</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#af81b3c7805c688558ab25d66a8adf982">enableInterrupts</a>(<span class="keywordtype">void</span> (*isr)(<span class="keywordtype">void</span>), uint8_t priority = 255) {</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;<a class="code" href="class_a_d_c___module.html#a65395dfc2a15bc015e1ee723b22235b5">enableInterrupts</a>(isr, priority);</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;<a class="code" href="class_a_d_c___module.html#a65395dfc2a15bc015e1ee723b22235b5">enableInterrupts</a>(isr, priority);</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;  }</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="class_a_d_c.html#ad8acae7988973bdede138deea567623a">  191</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#ad8acae7988973bdede138deea567623a">disableInterrupts</a>() {</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;<a class="code" href="class_a_d_c___module.html#aa4509062644982526fee3c02e0b528fc">disableInterrupts</a>();</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;<a class="code" href="class_a_d_c___module.html#aa4509062644982526fee3c02e0b528fc">disableInterrupts</a>();</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;  }</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160; </div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="preprocessor">#ifdef ADC_USE_DMA</span></div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160; </div>
<div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a10b9e674ed487b81160687e38fafbb59">  205</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a10b9e674ed487b81160687e38fafbb59">enableDMA</a>() {</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;<a class="code" href="class_a_d_c___module.html#af3d14c01b1442c0c34b5dbc9a6e49f35">enableDMA</a>();</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;<a class="code" href="class_a_d_c___module.html#af3d14c01b1442c0c34b5dbc9a6e49f35">enableDMA</a>();</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;  }</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160; </div>
<div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a58af22e8f95c1d2b1560153f906d1038">  215</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a58af22e8f95c1d2b1560153f906d1038">disableDMA</a>() {</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;<a class="code" href="class_a_d_c___module.html#ac1610dcab46476f287c2dd4d96465c47">disableDMA</a>();</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;<a class="code" href="class_a_d_c___module.html#ac1610dcab46476f287c2dd4d96465c47">disableDMA</a>();</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;  }</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160; </div>
<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="class_a_d_c.html#ad0737a1d21656cccc47851b85f4b3fc7">  233</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#ad0737a1d21656cccc47851b85f4b3fc7">enableCompare</a>(int16_t compValue, <span class="keywordtype">bool</span> greaterThan) {</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;<a class="code" href="class_a_d_c___module.html#ae7a632267f21b79c31c1dae56b5da188">enableCompare</a>(compValue, greaterThan);</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;<a class="code" href="class_a_d_c___module.html#ae7a632267f21b79c31c1dae56b5da188">enableCompare</a>(compValue, greaterThan);</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;  }</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160; </div>
<div class="line"><a name="l00254"></a><span class="lineno"><a class="line" href="class_a_d_c.html#aa2b5a656add303432afcd298f1a52110">  254</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#aa2b5a656add303432afcd298f1a52110">enableCompareRange</a>(int16_t lowerLimit, int16_t upperLimit,</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;                                 <span class="keywordtype">bool</span> insideRange, <span class="keywordtype">bool</span> inclusive) {</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;<a class="code" href="class_a_d_c___module.html#ab8e64bab9d4e7f1935a260629e5d71d5">enableCompareRange</a>(lowerLimit, upperLimit, insideRange, inclusive);</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;<a class="code" href="class_a_d_c___module.html#ab8e64bab9d4e7f1935a260629e5d71d5">enableCompareRange</a>(lowerLimit, upperLimit, insideRange, inclusive);</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;  }</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160; </div>
<div class="line"><a name="l00266"></a><span class="lineno"><a class="line" href="class_a_d_c.html#ad48e3b4b69170965fc4fe70ef042c099">  266</a></span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#ad48e3b4b69170965fc4fe70ef042c099">disableCompare</a>() {</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;<a class="code" href="class_a_d_c___module.html#ac635f675a9690a4db016c73c31818262">disableCompare</a>();</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;<a class="code" href="class_a_d_c___module.html#ac635f675a9690a4db016c73c31818262">disableCompare</a>();</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;  }</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160; </div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;<span class="preprocessor">#ifdef ADC_USE_PGA</span></div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160; </div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> enablePGA(uint8_t gain) {</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;enablePGA(gain);</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;enablePGA(gain);</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;  }</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160; </div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;  <span class="keyword">inline</span> <span class="keywordtype">void</span> disablePGA() {</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>-&gt;disablePGA();</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>-&gt;disablePGA();</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;  }</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160; </div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160; </div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160; </div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160; </div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160; </div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;  <span class="keywordtype">int</span> <a class="code" href="class_a_d_c.html#aaf6079870b115d8b029d3613d44091dd">analogRead</a>(uint8_t pin, int8_t adc_num = -1);</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160; </div>
<div class="line"><a name="l00323"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a4196bada3d9d28af2604175a8a79d872">  323</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="class_a_d_c.html#a4196bada3d9d28af2604175a8a79d872">analogRead</a>(<a class="code" href="namespace_a_d_c__settings.html#a8c2a64f3fca3ac6b82e8df8cf44f6ca2">ADC_INTERNAL_SOURCE</a> pin, int8_t adc_num = -1)</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;      __attribute__((always_inline)) {</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_a_d_c.html#aaf6079870b115d8b029d3613d44091dd">analogRead</a>(<span class="keyword">static_cast&lt;</span>uint8_t<span class="keyword">&gt;</span>(pin), adc_num);</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;  }</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160; </div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;<span class="preprocessor">#if ADC_DIFF_PAIRS &gt; 0</span></div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160; </div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;  <span class="keywordtype">int</span> <a class="code" href="class_a_d_c.html#aec3464cdb697f89cf162813b00b2e965">analogReadDifferential</a>(uint8_t pinP, uint8_t pinN, int8_t adc_num = -1);</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160; </div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160; </div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160; </div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160; </div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160; </div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#a113479488fae5f5407f884dd95fbec72">startSingleRead</a>(uint8_t pin, int8_t adc_num = -1);</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160; </div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;<span class="preprocessor">#if ADC_DIFF_PAIRS &gt; 0</span></div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160; </div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#ac1016c1d107118a0064c2b627dbd831b">startSingleDifferential</a>(uint8_t pinP, uint8_t pinN, int8_t adc_num = -1);</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160; </div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160; </div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;  <span class="keywordtype">int</span> <a class="code" href="class_a_d_c.html#aee7423bfcbb03465bb0bd1e3c6474452">readSingle</a>(int8_t adc_num = -1);</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160; </div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160; </div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160; </div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160; </div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160; </div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#ad592f87ec644457b5056ae41c645ac0a">startContinuous</a>(uint8_t pin, int8_t adc_num = -1);</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160; </div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;<span class="preprocessor">#if ADC_DIFF_PAIRS &gt; 0</span></div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160; </div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#ae6179fc2e5ca7de1b0a3eb1f36985885">startContinuousDifferential</a>(uint8_t pinP, uint8_t pinN,</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;                                   int8_t adc_num = -1);</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160; </div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160; </div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;  <span class="keywordtype">int</span> <a class="code" href="class_a_d_c.html#a749efc928425a1eea18341ccfafd1819">analogReadContinuous</a>(int8_t adc_num = -1);</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160; </div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160; </div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a436e52cf82ca735f636899de670a2f0c">stopContinuous</a>(int8_t adc_num = -1);</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160; </div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160; </div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160; </div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160; </div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160; </div>
<div class="line"><a name="l00441"></a><span class="lineno"><a class="line" href="struct_a_d_c_1_1_sync__result.html">  441</a></span>&#160;  <span class="keyword">struct </span><a class="code" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a> {</div>
<div class="line"><a name="l00442"></a><span class="lineno"><a class="line" href="struct_a_d_c_1_1_sync__result.html#aa523cf5b3ed9823c0ff672a4b8eb3f4e">  442</a></span>&#160;    int32_t <a class="code" href="struct_a_d_c_1_1_sync__result.html#aa523cf5b3ed9823c0ff672a4b8eb3f4e">result_adc0</a>; </div>
<div class="line"><a name="l00443"></a><span class="lineno"><a class="line" href="struct_a_d_c_1_1_sync__result.html#a652c42a16111d4edeb3cd7b324b382c7">  443</a></span>&#160;    int32_t <a class="code" href="struct_a_d_c_1_1_sync__result.html#a652c42a16111d4edeb3cd7b324b382c7">result_adc1</a>; </div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;  };</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160; </div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160; </div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160; </div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;  <a class="code" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a> <a class="code" href="class_a_d_c.html#ac8067db45057f691e664f414d1376d1e">analogSynchronizedRead</a>(uint8_t pin0, uint8_t pin1);</div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160; </div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160; </div>
<div class="line"><a name="l00467"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a8980e0b1c619d0a39beaf98228053e3d">  467</a></span>&#160;  <a class="code" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a> <a class="code" href="class_a_d_c.html#a8980e0b1c619d0a39beaf98228053e3d">analogSyncRead</a>(uint8_t pin0, uint8_t pin1)</div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;      __attribute__((always_inline)) {</div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_a_d_c.html#ac8067db45057f691e664f414d1376d1e">analogSynchronizedRead</a>(pin0, pin1);</div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;  }</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160; </div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;<span class="preprocessor">#if ADC_DIFF_PAIRS &gt; 0</span></div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160; </div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;  Sync_result <a class="code" href="class_a_d_c.html#a156bb3fe55e8155dc42fd7e9df1eaa55">analogSynchronizedReadDifferential</a>(uint8_t pin0P, uint8_t pin0N,</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;                                                 uint8_t pin1P, uint8_t pin1N);</div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160; </div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160; </div>
<div class="line"><a name="l00499"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a709a33de52fa14673be6170a869be22a">  499</a></span>&#160;  <a class="code" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a> <a class="code" href="class_a_d_c.html#a709a33de52fa14673be6170a869be22a">analogSyncReadDifferential</a>(uint8_t pin0P, uint8_t pin0N,</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;                                         uint8_t pin1P, uint8_t pin1N)</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;      __attribute__((always_inline)) {</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="class_a_d_c.html#a156bb3fe55e8155dc42fd7e9df1eaa55">analogSynchronizedReadDifferential</a>(pin0P, pin0N, pin1P, pin1N);</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;  }</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160; </div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160; </div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160; </div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#acbdb0f3a7419e5a0cd8b2c031dc8b9d7">startSynchronizedSingleRead</a>(uint8_t pin0, uint8_t pin1);</div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160; </div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;<span class="preprocessor">#if ADC_DIFF_PAIRS &gt; 0</span></div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160; </div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#a9cebd13de5da420591c779916865824a">startSynchronizedSingleDifferential</a>(uint8_t pin0P, uint8_t pin0N,</div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;                                           uint8_t pin1P, uint8_t pin1N);</div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160; </div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160; </div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;  Sync_result <a class="code" href="class_a_d_c.html#a38d941542bbdbc20c1b9e26a5051094a">readSynchronizedSingle</a>();</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160; </div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160; </div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160; </div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#af50305b76bf8798da1dd26f654b4f0e3">startSynchronizedContinuous</a>(uint8_t pin0, uint8_t pin1);</div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160; </div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;<span class="preprocessor">#if ADC_DIFF_PAIRS &gt; 0</span></div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160; </div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#a29851ff11635dcd85cff21a92271b571">startSynchronizedContinuousDifferential</a>(uint8_t pin0P, uint8_t pin0N,</div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;                                               uint8_t pin1P, uint8_t pin1N);</div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160; </div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160; </div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;  Sync_result <a class="code" href="class_a_d_c.html#acd10f3bc117a244e70e53c3489aa97bc">readSynchronizedContinuous</a>();</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160; </div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#ac2070250dd4d557b27ec0f4f2b360f21">stopSynchronizedContinuous</a>();</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160; </div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160; </div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160; </div>
<div class="line"><a name="l00578"></a><span class="lineno"><a class="line" href="class_a_d_c.html#aa65014de31051e06a469982ca286496b">  578</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#aa65014de31051e06a469982ca286496b">resetError</a>() {</div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; ADC_NUM_ADCS; i++) {</div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;      <a class="code" href="class_a_d_c.html#a03e1c7f64c02dec1976810a0a4967cf2">adc</a>[i]-&gt;<a class="code" href="class_a_d_c___module.html#abf980784cf468d28fc2cbb94d06be500">resetError</a>();</div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;    }</div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;  }</div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160; </div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;  <span class="comment">// should this be a constexpr?</span></div>
<div class="line"><a name="l00586"></a><span class="lineno"><a class="line" href="class_a_d_c.html#ab790c1b44b90ff497cbf3e88f4580be8">  586</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_a_d_c.html#ab790c1b44b90ff497cbf3e88f4580be8">channel2sc1aADC0</a>[ADC_MAX_PIN + 1];</div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_a_d_c.html#a756fe8fa6da7ab09cde1f7b27aeffd43">channel2sc1aADC1</a>[ADC_MAX_PIN + 1];</div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160; </div>
<div class="line"><a name="l00593"></a><span class="lineno"><a class="line" href="class_a_d_c.html#aa3fc624721f8108ef8b77b45a857bdc6">  593</a></span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_a_d_c.html#aa3fc624721f8108ef8b77b45a857bdc6">sc1a2channelADC0</a>[ADC_MAX_PIN + 1];</div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_a_d_c.html#ad1ed91f3ef9e283133455802c37c6501">sc1a2channelADC1</a>[ADC_MAX_PIN + 1];</div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160; </div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;<span class="preprocessor">#if ADC_DIFF_PAIRS &gt; 0</span></div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> ADC_Module::ADC_NLIST <a class="code" href="class_a_d_c.html#a3ac941166af84754393ce2e3006a1c16">diff_table_ADC0</a>[ADC_DIFF_PAIRS];</div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;<span class="preprocessor">#ifdef ADC_DUAL_ADCS</span></div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> ADC_Module::ADC_NLIST <a class="code" href="class_a_d_c.html#ac75d6d8768a6def95664d8bb00ae502a">diff_table_ADC1</a>[ADC_DIFF_PAIRS];</div>
<div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;};</div>
<div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160; </div>
<div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;}</div>
<div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160; </div>
<div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;<span class="preprocessor">#endif // ADC_H</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclass_a_d_c_html_a29851ff11635dcd85cff21a92271b571"><div class="ttname"><a href="class_a_d_c.html#a29851ff11635dcd85cff21a92271b571">ADC::startSynchronizedContinuousDifferential</a></div><div class="ttdeci">bool startSynchronizedContinuousDifferential(uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N)</div><div class="ttdoc">Starts a continuous differential conversion in both ADCs simultaneously.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l01059">ADC.cpp:1059</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_ac75d6d8768a6def95664d8bb00ae502a"><div class="ttname"><a href="class_a_d_c.html#ac75d6d8768a6def95664d8bb00ae502a">ADC::diff_table_ADC1</a></div><div class="ttdeci">static const ADC_Module::ADC_NLIST diff_table_ADC1[ADC_DIFF_PAIRS]</div><div class="ttdoc">Translate differential pin number to SC1A nomenclature.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00604">ADC.h:604</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a0d5b4dd16bbb03082daeeaadafec2474"><div class="ttname"><a href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">ADC::adc0</a></div><div class="ttdeci">ADC_Module *const adc0</div><div class="ttdoc">Object to control the ADC0.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00088">ADC.h:88</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a6b8f4f571b7729d9da50b72ab93ec023"><div class="ttname"><a href="class_a_d_c.html#a6b8f4f571b7729d9da50b72ab93ec023">ADC::setResolution</a></div><div class="ttdeci">void setResolution(uint8_t bits)</div><div class="ttdoc">Change the resolution for all ADCs.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00127">ADC.h:127</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a03e1c7f64c02dec1976810a0a4967cf2"><div class="ttname"><a href="class_a_d_c.html#a03e1c7f64c02dec1976810a0a4967cf2">ADC::adc</a></div><div class="ttdeci">ADC_Module *const adc[ADC_NUM_ADCS]</div><div class="ttdoc">Array with the ADC Modules.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00099">ADC.h:99</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_af50305b76bf8798da1dd26f654b4f0e3"><div class="ttname"><a href="class_a_d_c.html#af50305b76bf8798da1dd26f654b4f0e3">ADC::startSynchronizedContinuous</a></div><div class="ttdeci">bool startSynchronizedContinuous(uint8_t pin0, uint8_t pin1)</div><div class="ttdoc">Starts a continuous conversion in both ADCs simultaneously.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l01028">ADC.cpp:1028</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_ae6179fc2e5ca7de1b0a3eb1f36985885"><div class="ttname"><a href="class_a_d_c.html#ae6179fc2e5ca7de1b0a3eb1f36985885">ADC::startContinuousDifferential</a></div><div class="ttdeci">bool startContinuousDifferential(uint8_t pinP, uint8_t pinN, int8_t adc_num=-1)</div><div class="ttdoc">Starts continuous conversion between the pins (pinP-pinN).</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00601">ADC.cpp:601</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_ad0737a1d21656cccc47851b85f4b3fc7"><div class="ttname"><a href="class_a_d_c.html#ad0737a1d21656cccc47851b85f4b3fc7">ADC::enableCompare</a></div><div class="ttdeci">void enableCompare(int16_t compValue, bool greaterThan)</div><div class="ttdoc">Enable the compare function to a single value.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00233">ADC.h:233</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_af3d14c01b1442c0c34b5dbc9a6e49f35"><div class="ttname"><a href="class_a_d_c___module.html#af3d14c01b1442c0c34b5dbc9a6e49f35">ADC_Module::enableDMA</a></div><div class="ttdeci">void enableDMA()</div><div class="ttdoc">Enable DMA request.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8cpp_source.html#l00764">ADC_Module.cpp:764</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a749efc928425a1eea18341ccfafd1819"><div class="ttname"><a href="class_a_d_c.html#a749efc928425a1eea18341ccfafd1819">ADC::analogReadContinuous</a></div><div class="ttdeci">int analogReadContinuous(int8_t adc_num=-1)</div><div class="ttdoc">Reads the analog value of a continuous conversion.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00660">ADC.cpp:660</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_aa4509062644982526fee3c02e0b528fc"><div class="ttname"><a href="class_a_d_c___module.html#aa4509062644982526fee3c02e0b528fc">ADC_Module::disableInterrupts</a></div><div class="ttdeci">void disableInterrupts()</div><div class="ttdoc">Disable interrupts.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8cpp_source.html#l00747">ADC_Module.cpp:747</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_aa80d9ebc6a60605e1b9a25f2db8734e9"><div class="ttname"><a href="class_a_d_c.html#aa80d9ebc6a60605e1b9a25f2db8734e9">ADC::setAveraging</a></div><div class="ttdeci">void setAveraging(uint8_t num)</div><div class="ttdoc">Set the number of averages for all ADCs.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00165">ADC.h:165</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_a6bd8da02e5e9bd3b2b3db30d5faa3585"><div class="ttname"><a href="class_a_d_c___module.html#a6bd8da02e5e9bd3b2b3db30d5faa3585">ADC_Module::setResolution</a></div><div class="ttdeci">void setResolution(uint8_t bits)</div><div class="ttdoc">Change the resolution of the measurement.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8cpp_source.html#l00312">ADC_Module.cpp:312</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_ac8067db45057f691e664f414d1376d1e"><div class="ttname"><a href="class_a_d_c.html#ac8067db45057f691e664f414d1376d1e">ADC::analogSynchronizedRead</a></div><div class="ttdeci">Sync_result analogSynchronizedRead(uint8_t pin0, uint8_t pin1)</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00700">ADC.cpp:700</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_ad592f87ec644457b5056ae41c645ac0a"><div class="ttname"><a href="class_a_d_c.html#ad592f87ec644457b5056ae41c645ac0a">ADC::startContinuous</a></div><div class="ttdeci">bool startContinuous(uint8_t pin, int8_t adc_num=-1)</div><div class="ttdoc">Starts continuous conversion on the pin.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00542">ADC.cpp:542</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_aa2b5a656add303432afcd298f1a52110"><div class="ttname"><a href="class_a_d_c.html#aa2b5a656add303432afcd298f1a52110">ADC::enableCompareRange</a></div><div class="ttdeci">void enableCompareRange(int16_t lowerLimit, int16_t upperLimit, bool insideRange, bool inclusive)</div><div class="ttdoc">Enable the compare function to a range.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00254">ADC.h:254</a></div></div>
<div class="ttc" id="astruct_a_d_c_1_1_sync__result_html_a652c42a16111d4edeb3cd7b324b382c7"><div class="ttname"><a href="struct_a_d_c_1_1_sync__result.html#a652c42a16111d4edeb3cd7b324b382c7">ADC::Sync_result::result_adc1</a></div><div class="ttdeci">int32_t result_adc1</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00443">ADC.h:443</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_ac7dad7a76bdd4965eced74692a5de886"><div class="ttname"><a href="class_a_d_c.html#ac7dad7a76bdd4965eced74692a5de886">ADC::setSamplingSpeed</a></div><div class="ttdeci">void setSamplingSpeed(ADC_SAMPLING_SPEED speed)</div><div class="ttdoc">Sets the sampling speed for all ADCs.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00154">ADC.h:154</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_ac1016c1d107118a0064c2b627dbd831b"><div class="ttname"><a href="class_a_d_c.html#ac1016c1d107118a0064c2b627dbd831b">ADC::startSingleDifferential</a></div><div class="ttdeci">bool startSingleDifferential(uint8_t pinP, uint8_t pinN, int8_t adc_num=-1)</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00469">ADC.cpp:469</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_abf980784cf468d28fc2cbb94d06be500"><div class="ttname"><a href="class_a_d_c___module.html#abf980784cf468d28fc2cbb94d06be500">ADC_Module::resetError</a></div><div class="ttdeci">void resetError()</div><div class="ttdoc">Resets all errors from the ADC, if any.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8h_source.html#l00739">ADC_Module.h:739</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_aee7423bfcbb03465bb0bd1e3c6474452"><div class="ttname"><a href="class_a_d_c.html#aee7423bfcbb03465bb0bd1e3c6474452">ADC::readSingle</a></div><div class="ttdeci">int readSingle(int8_t adc_num=-1)</div><div class="ttdoc">Reads the analog value of a single conversion.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00526">ADC.cpp:526</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a9cebd13de5da420591c779916865824a"><div class="ttname"><a href="class_a_d_c.html#a9cebd13de5da420591c779916865824a">ADC::startSynchronizedSingleDifferential</a></div><div class="ttdeci">bool startSynchronizedSingleDifferential(uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N)</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00959">ADC.cpp:959</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_ac635f675a9690a4db016c73c31818262"><div class="ttname"><a href="class_a_d_c___module.html#ac635f675a9690a4db016c73c31818262">ADC_Module::disableCompare</a></div><div class="ttdeci">void disableCompare()</div><div class="ttdoc">Disable the compare function.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8cpp_source.html#l00893">ADC_Module.cpp:893</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a4196bada3d9d28af2604175a8a79d872"><div class="ttname"><a href="class_a_d_c.html#a4196bada3d9d28af2604175a8a79d872">ADC::analogRead</a></div><div class="ttdeci">int analogRead(ADC_INTERNAL_SOURCE pin, int8_t adc_num=-1)</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00323">ADC.h:323</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html"><div class="ttname"><a href="class_a_d_c___module.html">ADC_Module</a></div><div class="ttdoc">Implements all functions of the Teensy 3.x, LC, 4.x analog to digital converter.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8h_source.html#l00054">ADC_Module.h:54</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a8980e0b1c619d0a39beaf98228053e3d"><div class="ttname"><a href="class_a_d_c.html#a8980e0b1c619d0a39beaf98228053e3d">ADC::analogSyncRead</a></div><div class="ttdeci">Sync_result analogSyncRead(uint8_t pin0, uint8_t pin1)</div><div class="ttdoc">Same as analogSynchronizedRead.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00467">ADC.h:467</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_acbdb0f3a7419e5a0cd8b2c031dc8b9d7"><div class="ttname"><a href="class_a_d_c.html#acbdb0f3a7419e5a0cd8b2c031dc8b9d7">ADC::startSynchronizedSingleRead</a></div><div class="ttdeci">bool startSynchronizedSingleRead(uint8_t pin0, uint8_t pin1)</div><div class="ttdoc">Starts an analog measurement at the same time on the two ADC modules.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00905">ADC.cpp:905</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_a281b4f6ca2705f934bc86b1a25679138"><div class="ttname"><a href="class_a_d_c___module.html#a281b4f6ca2705f934bc86b1a25679138">ADC_Module::setConversionSpeed</a></div><div class="ttdeci">void setConversionSpeed(ADC_CONVERSION_SPEED speed)</div><div class="ttdoc">Sets the conversion speed (changes the ADC clock, ADCK)</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8cpp_source.html#l00431">ADC_Module.cpp:431</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a3ac941166af84754393ce2e3006a1c16"><div class="ttname"><a href="class_a_d_c.html#a3ac941166af84754393ce2e3006a1c16">ADC::diff_table_ADC0</a></div><div class="ttdeci">static const ADC_Module::ADC_NLIST diff_table_ADC0[ADC_DIFF_PAIRS]</div><div class="ttdoc">Translate differential pin number to SC1A nomenclature.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00601">ADC.h:601</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_acd10f3bc117a244e70e53c3489aa97bc"><div class="ttname"><a href="class_a_d_c.html#acd10f3bc117a244e70e53c3489aa97bc">ADC::readSynchronizedContinuous</a></div><div class="ttdeci">Sync_result readSynchronizedContinuous()</div><div class="ttdoc">Returns the values of both ADCs.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l01087">ADC.cpp:1087</a></div></div>
<div class="ttc" id="anamespace_a_d_c__settings_html_af0d80a1aae7288f77b13f0e01d9da0d3"><div class="ttname"><a href="namespace_a_d_c__settings.html#af0d80a1aae7288f77b13f0e01d9da0d3">ADC_settings::ADC_SAMPLING_SPEED</a></div><div class="ttdeci">ADC_SAMPLING_SPEED</div><div class="ttdoc">ADC sampling speed. It selects how many ADCK clock cycles to add.</div><div class="ttdef"><b>Definition:</b> <a href="settings__defines_8h_source.html#l00603">settings_defines.h:603</a></div></div>
<div class="ttc" id="aclass_a_d_c_html"><div class="ttname"><a href="class_a_d_c.html">ADC</a></div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00069">ADC.h:69</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a8f6c4642e9e5400220452feeb6be13b8"><div class="ttname"><a href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">ADC::adc1</a></div><div class="ttdeci">ADC_Module *const adc1</div><div class="ttdoc">Object to control the ADC1.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00091">ADC.h:91</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a4fe2513725fa0099460fc711b037f1e5"><div class="ttname"><a href="class_a_d_c.html#a4fe2513725fa0099460fc711b037f1e5">ADC::setReference</a></div><div class="ttdeci">void setReference(ADC_REFERENCE type)</div><div class="ttdoc">Set the voltage reference for all ADCs, default is vcc.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00111">ADC.h:111</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_ac2070250dd4d557b27ec0f4f2b360f21"><div class="ttname"><a href="class_a_d_c.html#ac2070250dd4d557b27ec0f4f2b360f21">ADC::stopSynchronizedContinuous</a></div><div class="ttdeci">void stopSynchronizedContinuous()</div><div class="ttdoc">Stops synchronous continuous conversion.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l01098">ADC.cpp:1098</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a38d941542bbdbc20c1b9e26a5051094a"><div class="ttname"><a href="class_a_d_c.html#a38d941542bbdbc20c1b9e26a5051094a">ADC::readSynchronizedSingle</a></div><div class="ttdeci">Sync_result readSynchronizedSingle()</div><div class="ttdoc">Reads the analog value of a single conversion.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l01012">ADC.cpp:1012</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_af81b3c7805c688558ab25d66a8adf982"><div class="ttname"><a href="class_a_d_c.html#af81b3c7805c688558ab25d66a8adf982">ADC::enableInterrupts</a></div><div class="ttdeci">void enableInterrupts(void(*isr)(void), uint8_t priority=255)</div><div class="ttdoc">Enable interrupts for all ADCs.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00181">ADC.h:181</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a60b6e21403b1f30984f63832c0562960"><div class="ttname"><a href="class_a_d_c.html#a60b6e21403b1f30984f63832c0562960">ADC::ADC</a></div><div class="ttdeci">ADC()</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00257">ADC.cpp:257</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a10b9e674ed487b81160687e38fafbb59"><div class="ttname"><a href="class_a_d_c.html#a10b9e674ed487b81160687e38fafbb59">ADC::enableDMA</a></div><div class="ttdeci">void enableDMA()</div><div class="ttdoc">Enable DMA request for all ADCs.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00205">ADC.h:205</a></div></div>
<div class="ttc" id="anamespace_a_d_c__settings_html_a8c2a64f3fca3ac6b82e8df8cf44f6ca2"><div class="ttname"><a href="namespace_a_d_c__settings.html#a8c2a64f3fca3ac6b82e8df8cf44f6ca2">ADC_settings::ADC_INTERNAL_SOURCE</a></div><div class="ttdeci">ADC_INTERNAL_SOURCE</div><div class="ttdoc">Other ADC sources to measure, such as the temperature sensor.</div><div class="ttdef"><b>Definition:</b> <a href="settings__defines_8h_source.html#l00284">settings_defines.h:284</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_a2aa4693c5be479f3189d31f59d212509"><div class="ttname"><a href="class_a_d_c___module.html#a2aa4693c5be479f3189d31f59d212509">ADC_Module::setSamplingSpeed</a></div><div class="ttdeci">void setSamplingSpeed(ADC_SAMPLING_SPEED speed)</div><div class="ttdoc">Sets the sampling speed.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8cpp_source.html#l00583">ADC_Module.cpp:583</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_ad48e3b4b69170965fc4fe70ef042c099"><div class="ttname"><a href="class_a_d_c.html#ad48e3b4b69170965fc4fe70ef042c099">ADC::disableCompare</a></div><div class="ttdeci">void disableCompare()</div><div class="ttdoc">Disable the compare function.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00266">ADC.h:266</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a436e52cf82ca735f636899de670a2f0c"><div class="ttname"><a href="class_a_d_c.html#a436e52cf82ca735f636899de670a2f0c">ADC::stopContinuous</a></div><div class="ttdeci">void stopContinuous(int8_t adc_num=-1)</div><div class="ttdoc">Stops continuous conversion.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00674">ADC.cpp:674</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_ab8e64bab9d4e7f1935a260629e5d71d5"><div class="ttname"><a href="class_a_d_c___module.html#ab8e64bab9d4e7f1935a260629e5d71d5">ADC_Module::enableCompareRange</a></div><div class="ttdeci">void enableCompareRange(int16_t lowerLimit, int16_t upperLimit, bool insideRange, bool inclusive)</div><div class="ttdoc">Enable the compare function to a range.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8cpp_source.html#l00824">ADC_Module.cpp:824</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_ab790c1b44b90ff497cbf3e88f4580be8"><div class="ttname"><a href="class_a_d_c.html#ab790c1b44b90ff497cbf3e88f4580be8">ADC::channel2sc1aADC0</a></div><div class="ttdeci">static const uint8_t channel2sc1aADC0[ADC_MAX_PIN+1]</div><div class="ttdoc">Translate pin number to SC1A nomenclature.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00586">ADC.h:586</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a756fe8fa6da7ab09cde1f7b27aeffd43"><div class="ttname"><a href="class_a_d_c.html#a756fe8fa6da7ab09cde1f7b27aeffd43">ADC::channel2sc1aADC1</a></div><div class="ttdeci">static const uint8_t channel2sc1aADC1[ADC_MAX_PIN+1]</div><div class="ttdoc">Translate pin number to SC1A nomenclature.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00589">ADC.h:589</a></div></div>
<div class="ttc" id="astruct_a_d_c_1_1_sync__result_html_aa523cf5b3ed9823c0ff672a4b8eb3f4e"><div class="ttname"><a href="struct_a_d_c_1_1_sync__result.html#aa523cf5b3ed9823c0ff672a4b8eb3f4e">ADC::Sync_result::result_adc0</a></div><div class="ttdeci">int32_t result_adc0</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00442">ADC.h:442</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_aa65014de31051e06a469982ca286496b"><div class="ttname"><a href="class_a_d_c.html#aa65014de31051e06a469982ca286496b">ADC::resetError</a></div><div class="ttdeci">void resetError()</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00578">ADC.h:578</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_aaf6079870b115d8b029d3613d44091dd"><div class="ttname"><a href="class_a_d_c.html#aaf6079870b115d8b029d3613d44091dd">ADC::analogRead</a></div><div class="ttdeci">int analogRead(uint8_t pin, int8_t adc_num=-1)</div><div class="ttdoc">Returns the analog value of the pin.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00284">ADC.cpp:284</a></div></div>
<div class="ttc" id="astruct_a_d_c_1_1_sync__result_html"><div class="ttname"><a href="struct_a_d_c_1_1_sync__result.html">ADC::Sync_result</a></div><div class="ttdoc">Struct for synchronous measurements.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00441">ADC.h:441</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_a55954618c5c27c1ffce4321e912bac52"><div class="ttname"><a href="class_a_d_c___module.html#a55954618c5c27c1ffce4321e912bac52">ADC_Module::setAveraging</a></div><div class="ttdeci">void setAveraging(uint8_t num)</div><div class="ttdoc">Set the number of averages.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8cpp_source.html#l00651">ADC_Module.cpp:651</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_a65395dfc2a15bc015e1ee723b22235b5"><div class="ttname"><a href="class_a_d_c___module.html#a65395dfc2a15bc015e1ee723b22235b5">ADC_Module::enableInterrupts</a></div><div class="ttdeci">void enableInterrupts(void(*isr)(void), uint8_t priority=255)</div><div class="ttdoc">Enable interrupts.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8cpp_source.html#l00726">ADC_Module.cpp:726</a></div></div>
<div class="ttc" id="anamespace_a_d_c__settings_html_a5f42fd9e070e88475ec7cee39bbf4f8d"><div class="ttname"><a href="namespace_a_d_c__settings.html#a5f42fd9e070e88475ec7cee39bbf4f8d">ADC_settings::ADC_REFERENCE</a></div><div class="ttdeci">ADC_REFERENCE</div><div class="ttdoc">Voltage reference for the ADC default is the external, that is connected to the 3....</div><div class="ttdef"><b>Definition:</b> <a href="settings__defines_8h_source.html#l00178">settings_defines.h:178</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_a784d946712d1d0ee475822b7b8f99ace"><div class="ttname"><a href="class_a_d_c___module.html#a784d946712d1d0ee475822b7b8f99ace">ADC_Module::setReference</a></div><div class="ttdeci">void setReference(ADC_REFERENCE ref_type)</div><div class="ttdoc">Set the voltage reference you prefer, default is vcc.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8cpp_source.html#l00258">ADC_Module.cpp:258</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_ae7a632267f21b79c31c1dae56b5da188"><div class="ttname"><a href="class_a_d_c___module.html#ae7a632267f21b79c31c1dae56b5da188">ADC_Module::enableCompare</a></div><div class="ttdeci">void enableCompare(int16_t compValue, bool greaterThan)</div><div class="ttdoc">Enable the compare function to a single value.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8cpp_source.html#l00798">ADC_Module.cpp:798</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a709a33de52fa14673be6170a869be22a"><div class="ttname"><a href="class_a_d_c.html#a709a33de52fa14673be6170a869be22a">ADC::analogSyncReadDifferential</a></div><div class="ttdeci">Sync_result analogSyncReadDifferential(uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N)</div><div class="ttdoc">Same as analogSynchronizedReadDifferential.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00499">ADC.h:499</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a58af22e8f95c1d2b1560153f906d1038"><div class="ttname"><a href="class_a_d_c.html#a58af22e8f95c1d2b1560153f906d1038">ADC::disableDMA</a></div><div class="ttdeci">void disableDMA()</div><div class="ttdoc">Disable DMA request for all ADCs.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00215">ADC.h:215</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_acca4ab7812f804a09b28d7a76daff8fa"><div class="ttname"><a href="class_a_d_c.html#acca4ab7812f804a09b28d7a76daff8fa">ADC::setConversionSpeed</a></div><div class="ttdeci">void setConversionSpeed(ADC_CONVERSION_SPEED speed)</div><div class="ttdoc">Sets the conversion speed for all ADCs.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00139">ADC.h:139</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a156bb3fe55e8155dc42fd7e9df1eaa55"><div class="ttname"><a href="class_a_d_c.html#a156bb3fe55e8155dc42fd7e9df1eaa55">ADC::analogSynchronizedReadDifferential</a></div><div class="ttdeci">Sync_result analogSynchronizedReadDifferential(uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N)</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00796">ADC.cpp:796</a></div></div>
<div class="ttc" id="anamespace_a_d_c__settings_html_aab853fc1fcb1992fd5d51408adf7688e"><div class="ttname"><a href="namespace_a_d_c__settings.html#aab853fc1fcb1992fd5d51408adf7688e">ADC_settings::ADC_CONVERSION_SPEED</a></div><div class="ttdeci">ADC_CONVERSION_SPEED</div><div class="ttdoc">ADC conversion speed. Common set of options to select the ADC clock speed F_ADCK, which depends on AD...</div><div class="ttdef"><b>Definition:</b> <a href="settings__defines_8h_source.html#l00562">settings_defines.h:562</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_aa3fc624721f8108ef8b77b45a857bdc6"><div class="ttname"><a href="class_a_d_c.html#aa3fc624721f8108ef8b77b45a857bdc6">ADC::sc1a2channelADC0</a></div><div class="ttdeci">static const uint8_t sc1a2channelADC0[ADC_MAX_PIN+1]</div><div class="ttdoc">Translate pin number to SC1A nomenclature for differential pins.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00593">ADC.h:593</a></div></div>
<div class="ttc" id="aclass_a_d_c___module_html_ac1610dcab46476f287c2dd4d96465c47"><div class="ttname"><a href="class_a_d_c___module.html#ac1610dcab46476f287c2dd4d96465c47">ADC_Module::disableDMA</a></div><div class="ttdeci">void disableDMA()</div><div class="ttdoc">Disable ADC DMA request.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c___module_8cpp_source.html#l00781">ADC_Module.cpp:781</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_aec3464cdb697f89cf162813b00b2e965"><div class="ttname"><a href="class_a_d_c.html#aec3464cdb697f89cf162813b00b2e965">ADC::analogReadDifferential</a></div><div class="ttdeci">int analogReadDifferential(uint8_t pinP, uint8_t pinN, int8_t adc_num=-1)</div><div class="ttdoc">Reads the differential analog value of two pins (pinP - pinN).</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00347">ADC.cpp:347</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_a113479488fae5f5407f884dd95fbec72"><div class="ttname"><a href="class_a_d_c.html#a113479488fae5f5407f884dd95fbec72">ADC::startSingleRead</a></div><div class="ttdeci">bool startSingleRead(uint8_t pin, int8_t adc_num=-1)</div><div class="ttdoc">Starts an analog measurement on the pin and enables interrupts.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8cpp_source.html#l00407">ADC.cpp:407</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_ad1ed91f3ef9e283133455802c37c6501"><div class="ttname"><a href="class_a_d_c.html#ad1ed91f3ef9e283133455802c37c6501">ADC::sc1a2channelADC1</a></div><div class="ttdeci">static const uint8_t sc1a2channelADC1[ADC_MAX_PIN+1]</div><div class="ttdoc">Translate pin number to SC1A nomenclature for differential pins.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00596">ADC.h:596</a></div></div>
<div class="ttc" id="aclass_a_d_c_html_ad8acae7988973bdede138deea567623a"><div class="ttname"><a href="class_a_d_c.html#ad8acae7988973bdede138deea567623a">ADC::disableInterrupts</a></div><div class="ttdeci">void disableInterrupts()</div><div class="ttdoc">Disable interrupts for all ADCs.</div><div class="ttdef"><b>Definition:</b> <a href="_a_d_c_8h_source.html#l00191">ADC.h:191</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>ADC.h</b></li>
    <li class="footer">Generated on Tue Nov 29 2022 23:16:33 for ADC by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
